package com.kinyx.framework.utils;

import org.junit.Assert;
import org.junit.Test;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public class KCharUtils_Tester_Case {

	@Test
	public void isUpperCase() {
		Assert.assertTrue(KCharUtils.isUpperCase('A'));
		Assert.assertTrue(KCharUtils.isUpperCase('Z'));

		Assert.assertFalse(KCharUtils.isUpperCase('a'));
		Assert.assertFalse(KCharUtils.isUpperCase('z'));

		Assert.assertFalse(KCharUtils.isUpperCase('0'));
		Assert.assertFalse(KCharUtils.isUpperCase('9'));

		Assert.assertFalse(KCharUtils.isUpperCase('$'));
		Assert.assertFalse(KCharUtils.isUpperCase('@'));
	}

	@Test
	public void isLowerCase() {
		Assert.assertFalse(KCharUtils.isLowerCase('A'));
		Assert.assertFalse(KCharUtils.isLowerCase('Z'));

		Assert.assertTrue(KCharUtils.isLowerCase('a'));
		Assert.assertTrue(KCharUtils.isLowerCase('z'));

		Assert.assertFalse(KCharUtils.isLowerCase('0'));
		Assert.assertFalse(KCharUtils.isLowerCase('9'));

		Assert.assertFalse(KCharUtils.isLowerCase('$'));
		Assert.assertFalse(KCharUtils.isLowerCase('@'));
	}

	@Test
	public void toUpperCase() {
		Assert.assertEquals('A', KCharUtils.toUpperCase('A'));
		Assert.assertEquals('Z', KCharUtils.toUpperCase('Z'));

		Assert.assertEquals('A', KCharUtils.toUpperCase('a'));
		Assert.assertEquals('Z', KCharUtils.toUpperCase('z'));

		Assert.assertEquals('0', KCharUtils.toUpperCase('0'));
		Assert.assertEquals('9', KCharUtils.toUpperCase('9'));

		Assert.assertEquals('$', KCharUtils.toUpperCase('$'));
		Assert.assertEquals('@', KCharUtils.toUpperCase('@'));
	}

	@Test
	public void toLowerCase() {
		Assert.assertEquals('a', KCharUtils.toLowerCase('A'));
		Assert.assertEquals('z', KCharUtils.toLowerCase('Z'));

		Assert.assertEquals('a', KCharUtils.toLowerCase('a'));
		Assert.assertEquals('z', KCharUtils.toLowerCase('z'));

		Assert.assertEquals('0', KCharUtils.toLowerCase('0'));
		Assert.assertEquals('9', KCharUtils.toLowerCase('9'));

		Assert.assertEquals('$', KCharUtils.toLowerCase('$'));
		Assert.assertEquals('@', KCharUtils.toLowerCase('@'));
	}

	@Test
	public void isNumber() {
		Assert.assertFalse(KCharUtils.isNumber('A'));
		Assert.assertFalse(KCharUtils.isNumber('Z'));

		Assert.assertFalse(KCharUtils.isNumber('a'));
		Assert.assertFalse(KCharUtils.isNumber('z'));

		Assert.assertTrue(KCharUtils.isNumber('0'));
		Assert.assertTrue(KCharUtils.isNumber('9'));

		Assert.assertFalse(KCharUtils.isNumber('$'));
		Assert.assertFalse(KCharUtils.isNumber('@'));
	}

}
